package com.zz.controller;

import com.zz.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.server.Session;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/site")
public class LoginUserController {



    @RequestMapping("/login")
    public String doLogin(HttpSession session){
        User user=new User();
        user.setUsername("张三");
        user.setPassword("123456");
        session.setAttribute("param",user);

        return "index";
    }
}
